$(function(){
    var guanwang={
        data:{
        },
        event:function () {

            $(".recr_table_wrap>table").on("click","tr",function () {
                location.href="recr_detial.html?recrId="+$(this).find(".id").text();
            });

        },
        init:function () {
            var that=this;
            that.event();
                JsonP({
                    url:guanwangID+"index.php?s=home/Hiring/listHiringQuery",
                    data:{},
                    success:function (res) {
                        var body_string="";
                        if(res.resStatus===1){
                             $.each(res.data,function (i,o) {
                                body_string+='<tr>' +
                                    '            <td class="hidden id">'+o.info_id+'</td>' +
                                    '            <td>'+o.position+'</td>' +
                                    '            <td>'+o.hiring_name+'</td>' +
                                    '            <td>'+o.place+'</td>' +
                                    '            <td>'+o.number+'</td>' +
                                    '            <td>'+o.time+'</td>' +
                                    '            <td> <b class="glyphicon glyphicon-chevron-right"></b> </td>' +
                                    '         </tr>'
                             });
                        }else{
                            body_string='<tr><td colspan="7" class="text-center">无数据...</td><td class="hidden"></td></tr>'
                        }
                        $(".recr_table_wrap tbody").empty().append(body_string);
                    }
                });



        }
    };

    guanwang.init();
});